﻿using sql_data_generator.FieldOptions;
using sql_data_generator.Generators;
using sql_data_generator.TextData;

namespace sql_data_generator.Randomizers
{
    class RandomizerCity : BaseRandomizer<FieldOptionsCity>, IRandomizer
    {
        private readonly RandomStringFromListGenerator _generator;

        public RandomizerCity(FieldOptionsCity options) : base(options)
        {
            _generator = new RandomStringFromListGenerator(Texts.Instance.CityNames);
        }

        public object GetData()
        {
            return IsNull() ? null : _generator.Generate();
        }
    }
}